package com.xl.controller;

import com.xl.utils.file.FileUtil;

import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.nio.charset.StandardCharsets;

public class Tst {
    public static void main(String[] args) throws IOException {

        String s = "" ;
        for (int i = 0; i < 10; i++) {
            s += "public void download(String fileName, HttpServletResponse response) {\n";
        }

        //把s写到一个文件里面
        FileUtil.noExistCreateDirs("D:/opt/cars/wireshark/zip");
        FileUtil.noExistCreateFile("D:/opt/cars/wireshark/zip/aaa.txt");

        File file = new File("D:/opt/cars/wireshark/zip/aaa.txt");
        FileOutputStream fileOutputStream = new FileOutputStream(file);
        byte[] bytes = new byte[1024];
        int len ;
        fileOutputStream.write(s.getBytes());


    }

}
